import {defineStore, acceptHMRUpdate} from 'pinia'
import {ref} from "vue";

export const useViewStore = defineStore("view", () => {
    const windowWidth = ref(1920);
    const windowHeight = ref(1080);
    const resizeWindow = () => {
        windowWidth.value = window.innerWidth;
        windowHeight.value = window.innerHeight;
    }
    return {
        windowWidth,
        windowHeight,
        resizeWindow
    }
})

if (import.meta.hot) {
    import.meta.hot.accept(acceptHMRUpdate(useViewStore, import.meta.hot))
}
